//
//  SocketChannelPool.h
//  socket
//
//  Created by  user on 11-10-22.
//  Copyright 2011 GuangZhouXuanWu. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "SocketChannel.h"

#import "XMSHttpChannel.h"

@class CRunLoopThread;

@interface CRequestChannelPool : NSObject

- (BOOL)addRequestChannel:(CRequestChannel *(^)())channel;

- (void)removeRequestChannel:(CRequestChannel*(^)())request;

- (void)cancelRequestChannel:(CRequestChannel *)request;

- (void)startRequestRunLoop;

- (void)stopRequestRunLoop;

- (void)cancelRequest;



- (BOOL)addRequestChannelPoolRunLoop:(void (^)(NSRunLoop *runloop))complete;

- (BOOL)addRequestChannelPoolRunLoopTread:(void (^)(NSThread *thread))complete;

- (void)removeRequestChannelPoolRunLoop:(void (^)(NSRunLoop *runloop))complete;

- (void)removeRequestChannelPoolRunLoopTread:(void (^)(NSThread *thread))complete;

@end
